package com.my.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.*;

/**
 * @author: marshal
 * @date: 2023-05-25 14:27
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class User {
    @TableId
    private Integer id;
    private String name;
    private Integer age;
    /**
     * 逻辑删除【0：未删除，1：删除】，加入逻辑删除字段以后，查询SQL会自动拼接上一个条件 WHERE deleted=0
     */
    @TableLogic
    @TableField(value = "is_deleted")
    private Integer deleted;
}
